
import {MapApi} from "../../model/map/MapApi";
import {Point} from "../../model/map/Point";
import {ViewportOptions} from "../../model/map/ViewportOptions";

export interface IMapBusiness{

    /**
     * 添加圆形覆盖物
     * @param {Point} point
     * @param {number} radius
     * @param {MapApi} mapApi
     */
    addCircle(point:Point,radius:number,mapApi:MapApi);

    /**
     * 添加标注
     * @param {Point} point
     * @param {MapApi} mapApi
     * @param {string} iconPath
     * @param {boolean} enableDragging
     * @param {number} zindex
     */
    addMarkerByPoint(point:Point,mapApi:MapApi,iconPath:string,enableDragging:boolean,zindex?:number);

    /**
     * 给标注添加label
     * @param {MapApi} mapApi
     * @param marker
     * @param point
     * @param w
     * @param h
     * @param {string} content
     * @param {boolean} isMore
     */
    addLabelForMarker(mapApi:MapApi, marker, point, w,h,content:string,isMore);

    /**
     * 删除覆盖物
     * @param {MapApi} mapApi
     * @param overlay
     */
    removeOverlay(mapApi:MapApi,overlay:any);

    setViewport(points:Array<Point>,viewportOptions: ViewportOptions,mapApi:MapApi)

    //添加覆盖物
    addOverlay(mapApi:MapApi,overlay:any);

    //平滑移动地图中心点
    panTo(p:Point,mapApi:MapApi);

    /**
     * 设置地图缩放级别
     * @param {number} zoom 地图缩放级别
     * @param {MapApi} mapApi
     */
    setZoom(zoom:number,mapApi:MapApi);

    //生成两点间的驾车路线
    generateDriveRoute(p1:Point,p2:Point,mapApi:MapApi);

    //搜索建议（自动完成）
    autoCompeleted(mapApi: MapApi, inputHtmlEle, callBack);

    //目的地搜索(地址转换为经纬度)
    searchDestination(addr:string,mapApi:MapApi,cb);

    //获取地图中心点地址
    getMapCenterAddress(mapApi:MapApi,callback);

    //获取坐标对应的地址
    getAddressByPoint(mapApi:MapApi,point,callback);

    //获取地址对应的经纬度
    getLatlngByAdd(mapApi:MapApi, address: string,city:string, callback)

    /**
     * 转换标准经纬度为地图经纬度
     * @param {MapApi} mapApi
     * @param {number} lat
     * @param {number} lng
     * @param cb
     */
    convertLatLng(mapApi:MapApi,lat:number,lng:number,cb);

    /**
     * 设置地图中心位置和缩放级别
     * @param {MapApi} mapApi
     * @param {Point} center
     * @param {number} zoom
     */
    centerAndZoom(mapApi:MapApi,center:Point,zoom:number)


    /**
     * 添加缩放控件
     * @param {MapApi} mapApi
     */
    addZoomControl(mapApi:MapApi);

}


